<template>
    <rx-dialog @ok="handleSubmit" @cancel="cancel">
        <rx-layout>
            <template #middle>
                <div style=" height: 100%; padding: 20px;">
                    <a-form layout="vertical" style="height:100%;">
                        <a-form-item  :label="filterI18n('title','标题')">
                            <a-input v-model:value="title" ></a-input>
                        </a-form-item>
                        <a-form-item  :label="filterI18n('defaultValues','默认值')">
                            <rx-user-component
                                v-model="defValue"
                                :single="!settings.multiSelect"
                                :readonly="false"
                                style="width:100%"></rx-user-component>
                        </a-form-item>
                        <a-form-item  :label="filterI18n('options','多选')">
                            <a-switch size="small" v-model:checked="settings.multiSelect"/>
                        </a-form-item>
                    </a-form>
                </div>
            </template>
        </rx-layout>
    </rx-dialog>
</template>

<script>
import filter from "./filter";
import {RxUserComponent} from "@lowcode/jpaas-share-component"
export default {
    name: "user-filter",
    mixins:[filter],
	components: {
        RxUserComponent
	},
    data() {
        return {
        }
    },
    created() {

    },
    methods: {
		filterI18n(name,text,key){
			return this.$ti18(name,text,"filterControllerLang",key);
		},
        //初始化配置
        initSetting() {
            debugger
            if(this.row.settings){
                this.settings =this.row.settings;
            }else {
                this.settings = {
                    multiSelect:false
                }
                this.defValue=[];
            }
        },
        //获取配置
        getSetting(){
            return this.settings;
        },
    },
    watch: {
    }
}
</script>

<style scoped>
</style>
